package com.tuni.birthdaymoney.web.model;

import java.util.ArrayList;
import java.util.List;

import org.joda.time.DateTime;

import com.tuni.birthdaymoney.persistence.entity.Operation;
import com.tuni.birthdaymoney.persistence.entity.Person;

public class OperationHistoryPage {
    private Iterable<Operation> operations;
    private Iterable<Integer> allYears;
    private List<Person> allPeople;
    private Person humanResources;
    private Person receiptor;
    private Person donator;
    private Integer selectedYear;
    private DateTime startDate;
    private DateTime endDate;
    
    public Iterable<Operation> getOperations() {
        return operations;
    }

    public void setOperations(Iterable<Operation> operations) {
        this.operations = operations;
    }

    public Person getHumanResources() {
        return humanResources;
    }

    public void setHumanResources(Person humanResources) {
        this.humanResources = humanResources;
    }

    public Person getReceiptor() {
        return receiptor;
    }

    public void setReceiptor(Person receiptor) {
        this.receiptor = receiptor;
    }

    public Person getDonator() {
        return donator;
    }

    public void setDonator(Person donator) {
        this.donator = donator;
    }

    public Integer getSelectedYear() {
        return selectedYear;
    }

    public void setSelectedYear(Integer selectedYear) {
        this.selectedYear = selectedYear;
    }

    public DateTime getStartDate() {
        return startDate;
    }

    public void setStartDate(DateTime startDate) {
        this.startDate = startDate;
    }

    public DateTime getEndDate() {
        return endDate;
    }

    public void setEndDate(DateTime endDate) {
        this.endDate = endDate;
    }

    public Iterable<Integer> getAllYears() {
        return allYears;
    }

    public void setAllYears(Iterable<Integer> allYears) {
        this.allYears = allYears;
    }

    public Iterable<Person> getAllPeople() {
        return allPeople;
    }

    public void setAllPeople(Iterable<Person> allPeople) {
        this.allPeople = new ArrayList<Person>();
        this.allPeople.add(null);
        for (Person person : allPeople) {
            this.allPeople.add(person);
        }
    }
}
